var RequireUtil = function() {
    var MAP_VIEW_LIB = "map_view";
    var MAP_MODULE = [MAP_VIEW_LIB];
    
    var BOILER_VIEW_LIB = "boiler_tpl_view";
    var BOILER_MODULE = [BOILER_VIEW_LIB];
    
    var CALCULATE_DATA_VIEW_LIB = "calculate_data_view";
    var CALCULATE_DATA_MODULE = [CALCULATE_DATA_VIEW_LIB];
    
    var MAIL_VIEW_LIB = "mail_content_view";
    var CANVAS_PLUGIN = "canvas_plugin";
    var MAIL_MODULE = [CANVAS_PLUGIN,MAIL_VIEW_LIB];
    
    var MENU_VIEW_LIB = "menu_view";
    var DASH_BOARD_LIB = "dashboard";
    var MENU_MODULE = [MENU_VIEW_LIB,DASH_BOARD_LIB];
    
    return {
        requireTpl : function(tplName, callback) {
            require([ "text!tpl/" + tplName ], callback);
        },
        requireTpls : function(tplNames, callback) {
            for ( var i = 0, n = tplNames.length; i < n; i++) {
                tplNames[i] = "text!tpl/" + tplNames[i];
            }
            require(tplNames, callback);
        },
        mailTpl : function (callback){
            console.log("Begin mapTpl");
            this.requireTpl("mail_content_tpl.htm", callback);
            console.log("End mapTpl");
        },
        mapTpl : function (callback){
            console.log("Begin mapTpl");
            this.requireTpl("map_view.htm", callback);
            console.log("End mapTpl");
        },
        boilerTpl : function (callback){
            console.log("Begin mapTpl");
            this.requireTpl("boiler_tpl_view.htm", callback);
            console.log("End mapTpl");
        },
        calculateDataTpl : function(callback){
            console.log("Begin calculateDataTemplate");
            this.requireTpl("calculate_data_view.htm", callback);
            console.log("End calculateDataTemplate");
        },
        menuTpl : function(callback){
            console.log("Begin menuTpl");
            this.requireTpl("menu_template_view.htm", callback);
            console.log("End menuTpl");
        },
        mapModule : function (callback) {
            console.log("Begin mapModule");
            require(MAP_MODULE,callback);
            console.log("End mapModule");
        },
        
        boilerModule : function (callback) {
            console.log("Begin boilerModule");
            require(BOILER_MODULE,callback);
            console.log("End boilerModule");
        },
        
        calculateDataModule : function(callback){
            console.log("Begin boilerModule");
            require(CALCULATE_DATA_MODULE,callback);
            console.log("End boilerModule");
        },
        
        menuModule : function(callback){
            console.log("Begin menuModule");
            require(MENU_MODULE,callback);
            console.log("End menuModule");
        },
        
        mailModule : function(callback){
            console.log("Begin mailModule");
            require(MAIL_MODULE,callback);
            console.log("End mailModule");
        },
    };
}();
